package com.dailywork.basepro.extend;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class PersonComparable implements Comparable<PersonComparable> {

    String name;
    String address;

    @Override
    public int compareTo(PersonComparable person) {
        if (name.length() >= person.getName().length()
                && address.length() >= person.getAddress().length()) {
            return 1;
        } else {
            return -1;
        }
    }
}
